TouchEvent

A touch event that provides access to the touch event data.

This event occurs when a user performs an action with a touch device, for example, touches the screen, moves a finger on the screen, or performs a multi-touch gesture.

Since

8.0.0

Functions

Link copied to clipboard
abstract fun changedTouches(): List<TouchPoint>
Contains touch points that have changed since the last touch event.
Link copied to clipboard
Returns an Optional that contains the event target that represents the element to which the event handler has been attached, otherwise an empty Optional.
Link copied to clipboard
abstract fun isBubbles(): Boolean
Returns true if the event bubbles up through the DOM, otherwise false.
Link copied to clipboard
abstract fun isCancelable(): Boolean
Returns true when the event can be canceled, and therefore prevented as if the event never happened.
Link copied to clipboard
abstract fun isTrusted(): Boolean
Returns true if the event is trusted, and therefore was generated by a user action.
Link copied to clipboard
abstract fun keyModifiers(): KeyModifiers
Returns the key modifiers that are applied to the event.
Link copied to clipboard
abstract fun phase(): EventPhase
Returns the event phase.
Link copied to clipboard
abstract fun preventDefault()
Informs the browser that if the event is not explicitly handled, its default action should not be performed.
Link copied to clipboard
abstract fun stopPropagation()
Informs the browser that the event should not propagate in the capturing and bubbling phases.
Link copied to clipboard
abstract fun target(): Optional<EventTarget>
Returns an Optional that contains the element on which the event occurred if it exists, otherwise an empty Optional.
Link copied to clipboard
abstract fun targetTouches(): List<TouchPoint>
Contains all touch points that are specific to the target element.
Link copied to clipboard
abstract fun touches(): List<TouchPoint>
Returns all touch points that are currently on the screen.
Link copied to clipboard
abstract fun type(): EventType
Returns the event type.